home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / mat.zip / MAT.DOC < prev    next >
Text File  |  1988-01-23  |  5KB  |  179 lines

  1.                - MAT -
  2.  
  3.  
  4. It seems that one of the things that BBS Sysops do best is moan
  5. and groan about file uploads.
  6.  
  7. It also seems that one of the things that BBS callers do best is
  8. moan and groan about how tough it is to find a file to upload.
  9.  
  10. Sysops often hear lines like, "you already have every file in the
  11. free world on your Bulletin board".  Well, it just ain't so.  You'd
  12. be surprised how small the intersection of files on any two
  13. bulletin boards really is.  I was.
  14.  
  15. If SET_1 is the set of all files on bulletin board A, and SET_2 is
  16. the set of all files on bulletin board B, then, according to the
  17. diagram below;
  18.  
  19.     Group A are the files which exist only on Board A.
  20.     Group B are the files which exist on both Board A and Board B.
  21.     Group C are the files which exist only on Board B.
  22.  
  23. If I wanted to upload a file to Board A, I would be very interested
  24. in knowing the contents of Group C, since every element of this group
  25. is a candidate for uploading to Board A.
  26.  
  27.  
  28.            ┌───────────────────────┐
  29.            │       SET_1           │
  30.            │               │
  31.            │       ┌───────────┼────────────┐
  32.            │   Group   │           │        │
  33.            │     A       │   Group   │        │
  34.            │       │     B     │  Group     │
  35.            │       │           │    C        │
  36.            │       │           │        │
  37.            └───────────┼───────────┘        │
  38.                │                │
  39.                │                │
  40.                │        SET_2        │
  41.                └────────────────────────┘
  42.  
  43.  
  44.    SET_1 is the set of files which are members of Group A and Group B.
  45.    SET_2 is the set of files which are members of Group B and Group C.
  46.    Group B is called the intersection of sets 1 and 2.
  47.  
  48.  
  49.  
  50. In fact, if I knew the contents of Group C, I could become an uploading
  51. maniac.
  52.  
  53. MAT is a program (actually a filter) whose input is SET_2, and whose
  54. output is either Group C, or alternatively, "Group B", the intersection of
  55. the 2 sets.
  56.  
  57.  
  58.  
  59. Here's how to use MAT:
  60. ----------------------
  61.  
  62.         mat [-vnd] -f<control-file>  file1 file2 .....
  63.  
  64.     MAT will read the control file (the -f option), and then read
  65.     the remaining files named in the command line.
  66.  
  67.     MAT is invoked at the MS-DOS command line in the following
  68.     manner;
  69.  
  70.         C> MAT -f mybbs.lst foreign.lst
  71.  
  72.         or,
  73.  
  74.         C> MAT -f mybbs.lst < foreign.lst
  75.  
  76.     MAT will filter the "foreign" list, outputting only those
  77.     lines from "foreign.lst" which don't match the first word of
  78.     any line in the control file.
  79.  
  80.     Since MAT expects both input and control files to be in this format;
  81.  
  82.      BMGREP2.ARC     29696    12-28-87  Boyer-Moore Search Text Files wit
  83.      FBACK.ARC     36864    12-28-87  Best hd backup yet!
  84.      HEADHUNT.ARC     36864    12-28-87  Get the proper includes in Turbo C
  85.      LEGAL.ARC     70656    12-28-87  many legal documents...fill in the bla
  86.      MAGNCART.ARC      9216    12-28-87  The Magna Carta.  King John signed it.
  87.      OMFDUMP.ARC     23552    12-28-87  Dump .obj files into readable form
  88.      CLONINV.ARC     83968    12-27-87  New Version of Space Invaders Game
  89.  
  90.     you can either capture lists with your communications programs, or
  91.     use catalogs of files which are provided for downloading by
  92.     most BBS's.
  93.  
  94.     MAT will read each line of the control file, discarding everything
  95.     beyond the first whitespace (keeping only the file name), and load
  96.     the names into a list.    Then mat will read the input file(s) and
  97.     search for matches, outputting all it matches which it finds.
  98.  
  99.  
  100.  
  101. OPTIONS:
  102. -------
  103.         -v    Verbose mode.  Outputs statistical info to stderr.
  104.         -n    Intersection.  Outputs intersection of 2 sets.
  105.         -d    Debug mode.  Outputs debug info.
  106.  
  107.     If you'd like to see the intersection of 2 lists, just
  108.     use the -n option.
  109.  
  110.     Since the control list is kept in memory, the number of control
  111.     input lines will be limited depending on how much RAM you have
  112.     in your system.  I processed an approximately 8000 file list
  113.     in a 640K system with no problem.
  114.  
  115.     MAT will accept more than 1 control file, so that you may
  116.     invoke MAT by;
  117.  
  118.         mat -f my_bbs1.lst -f my_bbs2.lst < other.lst
  119.  
  120.     If your bulletin board has a large list, or you plan to use
  121.     MAT often, you may increase processing efficiency by cutting
  122.     the control list with a suitable "cut" utility.  I've included
  123.     one with MAT.
  124.  
  125.         cut -f1 < my_bbs.lst >short.lst
  126.         mat -f short.lst new_bbs.lst
  127.  
  128.     Commands such as those listed above will improve MAT's
  129.     processing time.
  130.  
  131.  
  132.  
  133. Examples
  134. --------
  135.  
  136. Two lists, mybbs.lst, and test.lst have been included to provide examples
  137. of MAT's use.
  138.  
  139.     To find the intersection (those files common to both lists)
  140.     of the two lists, type;
  141.  
  142.         MAT -n -f mybbs.lst test.lst
  143.  
  144.     to find files in test.lst which aren't in mybbs.lst,
  145.     type;
  146.         MAT -f mybbs.lst test.lst
  147.  
  148.     to find files in mybbs.lst which aren't in test.lst,
  149.     type;
  150.         MAT -f test.lst mybbs.lst
  151.  
  152.  
  153.  
  154.  
  155.  
  156. WARNING:    Extensive Use of this program will cause all bulletin
  157.         boards to contain all the same files. <Ha, Ha>
  158.  
  159.  
  160. Any comments, suggestions or criticisms;
  161.  
  162.             Bob Halsall
  163.             c/o Eastern 'C' Board
  164.             Suffern, NY
  165.             (914)-368-0658
  166.  
  167. If you find that this program has endeared you to the Sysop of
  168. your favorite board, or is partially responsible for your increased
  169. security level, please send a few dollars to :
  170.  
  171.             The American Cancer Society
  172.             90 Park Avenue
  173.             New York, New York 10016
  174.  
  175.         Let's kick cancer's a**!!!
  176.  
  177.  
  178.  
  179.